package com.ruoyi.charging.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.charging.mapper.ChargingBillExceptionMapper;
import com.ruoyi.charging.domain.ChargingBillException;
import com.ruoyi.charging.service.IChargingBillExceptionService;

/**
 * 订单异常Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-06
 */
@Service
public class ChargingBillExceptionServiceImpl implements IChargingBillExceptionService 
{
    @Autowired
    private ChargingBillExceptionMapper chargingBillExceptionMapper;

    /**
     * 查询订单异常
     * 
     * @param id 订单异常主键
     * @return 订单异常
     */
    @Override
    public ChargingBillException selectChargingBillExceptionById(Long id)
    {
        return chargingBillExceptionMapper.selectChargingBillExceptionById(id);
    }

    /**
     * 查询订单异常列表
     * 
     * @param chargingBillException 订单异常
     * @return 订单异常
     */
    @Override
    public List<ChargingBillException> selectChargingBillExceptionList(ChargingBillException chargingBillException)
    {
        return chargingBillExceptionMapper.selectChargingBillExceptionList(chargingBillException);
    }

    /**
     * 新增订单异常
     * 
     * @param chargingBillException 订单异常
     * @return 结果
     */
    @Override
    public int insertChargingBillException(ChargingBillException chargingBillException)
    {
        chargingBillException.setCreateTime(DateUtils.getNowDate());
        return chargingBillExceptionMapper.insertChargingBillException(chargingBillException);
    }

    /**
     * 修改订单异常
     * 
     * @param chargingBillException 订单异常
     * @return 结果
     */
    @Override
    public int updateChargingBillException(ChargingBillException chargingBillException)
    {
        return chargingBillExceptionMapper.updateChargingBillException(chargingBillException);
    }

    /**
     * 批量删除订单异常
     * 
     * @param ids 需要删除的订单异常主键
     * @return 结果
     */
    @Override
    public int deleteChargingBillExceptionByIds(Long[] ids)
    {
        return chargingBillExceptionMapper.deleteChargingBillExceptionByIds(ids);
    }

    /**
     * 删除订单异常信息
     * 
     * @param id 订单异常主键
     * @return 结果
     */
    @Override
    public int deleteChargingBillExceptionById(Long id)
    {
        return chargingBillExceptionMapper.deleteChargingBillExceptionById(id);
    }
}
